home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2011 April / ME_2011_04.iso / [Video-Tutorial] / 9430830 / qicknavigation.swf / scripts / frame_1 / DoAction_2.as next >
Encoding:
Text File  |  2009-08-24  |  21.7 KB  |  717 lines

  1. function loadContentXml()
  2. {
  3.    cd_content = new XML();
  4.    cd_content.ignoreWhite = true;
  5.    cd_content.load(contPath);
  6.    cd_content.onLoad = contentOnLoad;
  7.    cd_content.load(contPath);
  8. }
  9. function contentOnLoad(success)
  10. {
  11.    if(success)
  12.    {
  13.       updateContentXml(cd_content.firstChild.childNodes,[0]);
  14.    }
  15.    else
  16.    {
  17.       trace("fehler beim laden");
  18.    }
  19. }
  20. function updateContentXml(nodes_array, depth_array)
  21. {
  22.    var _loc1_ = 0;
  23.    while(_loc1_ < nodes_array.length)
  24.    {
  25.       depth_array[depth_array.length - 1] += 1;
  26.       var _loc4_ = depth_array.join(".") + ".";
  27.       nodes_array[_loc1_].attributes.index = _loc4_;
  28.       if(nodes_array[_loc1_].hasChildNodes())
  29.       {
  30.          updateContentXml(nodes_array[_loc1_].childNodes,depth_array.concat([0]));
  31.       }
  32.       _loc1_ = _loc1_ + 1;
  33.    }
  34.    if(depth_array.length == 1)
  35.    {
  36.       movie_navigation_pos_mc._visible = true;
  37.    }
  38. }
  39. function generateSettings()
  40. {
  41.    if(_global.$tweenManager == undefined)
  42.    {
  43.       _global.$tweenManager = new zigo.tweenManager();
  44.    }
  45.    else
  46.    {
  47.       _global.$tweenManager.cleanUp();
  48.       _global.$tweenManager.init();
  49.    }
  50.    com.robertpenner.easing.Back;
  51.    com.robertpenner.easing.Bounce;
  52.    com.robertpenner.easing.Circ;
  53.    com.robertpenner.easing.Cubic;
  54.    com.robertpenner.easing.Elastic;
  55.    com.robertpenner.easing.Expo;
  56.    com.robertpenner.easing.Linear;
  57.    com.robertpenner.easing.Quad;
  58.    com.robertpenner.easing.Quart;
  59.    com.robertpenner.easing.Quint;
  60.    com.robertpenner.easing.Sine;
  61.    var Mp = MovieClip.prototype;
  62.    Mp.addListener = function()
  63.    {
  64.       if(!this._listeners)
  65.       {
  66.          AsBroadcaster.initialize(this);
  67.       }
  68.       this.addListener.apply(this,arguments);
  69.    };
  70.    ASSetPropFlags(Mp,"addListener",1,0);
  71.    Mp.tween = function(props, pEnd, seconds, animType, delay, callback, extra1, extra2)
  72.    {
  73.       if(_global.$tweenManager.isTweenLocked(this))
  74.       {
  75.          trace("tween not added, this movieclip is locked");
  76.          return undefined;
  77.       }
  78.       if(arguments.length < 2)
  79.       {
  80.          trace("tween not added, props & pEnd must be defined");
  81.          return undefined;
  82.       }
  83.       if(typeof props == "string")
  84.       {
  85.          if(props.indexOf(",") > -1)
  86.          {
  87.             props = props.split(" ").join("").split(",");
  88.          }
  89.          else
  90.          {
  91.             props = [props];
  92.          }
  93.       }
  94.       if(!(pEnd instanceof Array))
  95.       {
  96.          pEnd = [pEnd];
  97.          while(pEnd.length < props.length)
  98.          {
  99.             pEnd.push(pEnd[0]);
  100.          }
  101.       }
  102.       if(seconds == undefined)
  103.       {
  104.          seconds = 2;
  105.       }
  106.       else if(seconds < 0.01)
  107.       {
  108.          seconds = 0;
  109.       }
  110.       if(delay < 0.01 || delay == undefined)
  111.       {
  112.          delay = 0;
  113.       }
  114.       switch(typeof animType)
  115.       {
  116.          case "string":
  117.             animType = animType.toLowerCase();
  118.             if(animType == "linear")
  119.             {
  120.                var eqf = com.robertpenner.easing.Linear.easeNone;
  121.             }
  122.             else if(animType.indexOf("easeoutin") == 0)
  123.             {
  124.                var t = animType.substr(9);
  125.                t = t.charAt(0).toUpperCase() + t.substr(1);
  126.                var eqf = com.robertpenner.easing[t].easeOutIn;
  127.             }
  128.             else if(animType.indexOf("easeinout") == 0)
  129.             {
  130.                var t = animType.substr(9);
  131.                t = t.charAt(0).toUpperCase() + t.substr(1);
  132.                var eqf = com.robertpenner.easing[t].easeInOut;
  133.             }
  134.             else if(animType.indexOf("easein") == 0)
  135.             {
  136.                var t = animType.substr(6);
  137.                t = t.charAt(0).toUpperCase() + t.substr(1);
  138.                var eqf = com.robertpenner.easing[t].easeIn;
  139.             }
  140.             else if(animType.indexOf("easeout") == 0)
  141.             {
  142.                var t = animType.substr(7);
  143.                t = t.charAt(0).toUpperCase() + t.substr(1);
  144.                var eqf = com.robertpenner.easing[t].easeOut;
  145.             }
  146.             if(eqf == undefined)
  147.             {
  148.                var eqf = com.robertpenner.easing.Expo.easeOut;
  149.             }
  150.             break;
  151.          case "function":
  152.             var eqf = animType;
  153.             break;
  154.          case "object":
  155.             if(animType.ease != undefined && animType.pts != undefined)
  156.             {
  157.                var eqf = animType.ease;
  158.                extra1 = animType.pts;
  159.             }
  160.             else
  161.             {
  162.                var eqf = com.robertpenner.easing.Expo.easeOut;
  163.             }
  164.             break;
  165.          default:
  166.             var eqf = com.robertpenner.easing.Expo.easeOut;
  167.       }
  168.       switch(typeof callback)
  169.       {
  170.          case "function":
  171.             callback = {func:callback,scope:this._parent};
  172.             break;
  173.          case "string":
  174.             var ilp;
  175.             var funcp;
  176.             var scope;
  177.             var args;
  178.             var a;
  179.             ilp = callback.indexOf("(");
  180.             funcp = callback.slice(0,ilp);
  181.             scope = eval(funcp.slice(0,funcp.lastIndexOf(".")));
  182.             func = eval(funcp);
  183.             args = callback.slice(ilp + 1,callback.lastIndexOf(")")).split(",");
  184.             var i = 0;
  185.             while(i < args.length)
  186.             {
  187.                a = eval(args[i]);
  188.                if(a != undefined)
  189.                {
  190.                   args[i] = a;
  191.                }
  192.                i++;
  193.             }
  194.             callback = {func:func,scope:scope,args:args};
  195.       }
  196.       if(_global.$tweenManager.autoStop)
  197.       {
  198.          _global.$tweenManager.removeTween(this);
  199.       }
  200.       if(delay > 0)
  201.       {
  202.          _global.$tweenManager.addTweenWithDelay(delay,this,props,pEnd,seconds,eqf,callback,extra1,extra2);
  203.       }
  204.       else
  205.       {
  206.          _global.$tweenManager.addTween(this,props,pEnd,seconds,eqf,callback,extra1,extra2);
  207.       }
  208.    };
  209.    Mp.stopTween = function(props)
  210.    {
  211.       if(typeof props == "string")
  212.       {
  213.          if(props.indexOf(",") > -1)
  214.          {
  215.             props = props.split(" ").join("").split(",");
  216.          }
  217.          else
  218.          {
  219.             props = [props];
  220.          }
  221.       }
  222.       _global.$tweenManager.removeTween(this,props);
  223.    };
  224.    Mp.isTweening = function(prop)
  225.    {
  226.       return _global.$tweenManager.isTweening(this,prop);
  227.    };
  228.    Mp.getTweens = function()
  229.    {
  230.       return _global.$tweenManager.getTweens(this);
  231.    };
  232.    Mp.lockTween = function()
  233.    {
  234.       _global.$tweenManager.lockTween(this,true);
  235.    };
  236.    Mp.unlockTween = function()
  237.    {
  238.       _global.$tweenManager.lockTween(this,false);
  239.    };
  240.    Mp.isTweenLocked = function()
  241.    {
  242.       return _global.$tweenManager.isTweenLocked(this);
  243.    };
  244.    Mp.isTweenPaused = function(prop)
  245.    {
  246.       return _global.$tweenManager.isTweenPaused(this,prop);
  247.    };
  248.    Mp.pauseTween = function(props)
  249.    {
  250.       var _loc4_ = undefined;
  251.       if(props != undefined)
  252.       {
  253.          if(typeof props == "string")
  254.          {
  255.             if(props.indexOf(",") > -1)
  256.             {
  257.                props = props.split(" ").join("").split(",");
  258.             }
  259.             else
  260.             {
  261.                props = [props];
  262.             }
  263.          }
  264.          _loc4_ = {};
  265.          for(var _loc5_ in props)
  266.          {
  267.             _loc4_[props[_loc5_]] = true;
  268.          }
  269.       }
  270.       _global.$tweenManager.pauseTween(this,_loc4_);
  271.    };
  272.    Mp.unpauseTween = function(props)
  273.    {
  274.       var _loc4_ = undefined;
  275.       if(props != undefined)
  276.       {
  277.          if(typeof props == "string")
  278.          {
  279.             if(props.indexOf(",") > -1)
  280.             {
  281.                props = props.split(" ").join("").split(",");
  282.             }
  283.             else
  284.             {
  285.                props = [props];
  286.             }
  287.          }
  288.          _loc4_ = {};
  289.          for(var _loc5_ in props)
  290.          {
  291.             _loc4_[props[_loc5_]] = true;
  292.          }
  293.       }
  294.       _global.$tweenManager.unpauseTween(this,_loc4_);
  295.    };
  296.    Mp.pauseAllTweens = function()
  297.    {
  298.       _global.$tweenManager.pauseTween();
  299.    };
  300.    Mp.unpauseAllTweens = function()
  301.    {
  302.       _global.$tweenManager.unpauseTween();
  303.    };
  304.    Mp.stopAllTweens = function()
  305.    {
  306.       _global.$tweenManager.stopAll();
  307.    };
  308.    Mp.ffTween = function(props)
  309.    {
  310.       var _loc4_ = undefined;
  311.       if(props != undefined)
  312.       {
  313.          if(typeof props == "string")
  314.          {
  315.             if(props.indexOf(",") > -1)
  316.             {
  317.                props = props.split(" ").join("").split(",");
  318.             }
  319.             else
  320.             {
  321.                props = [props];
  322.             }
  323.          }
  324.          _loc4_ = {};
  325.          for(var _loc5_ in props)
  326.          {
  327.             _loc4_[props[_loc5_]] = true;
  328.          }
  329.       }
  330.       _global.$tweenManager.ffTween(this,_loc4_);
  331.    };
  332.    Mp.rewTween = function(props)
  333.    {
  334.       var _loc4_ = undefined;
  335.       if(props != undefined)
  336.       {
  337.          if(typeof props == "string")
  338.          {
  339.             if(props.indexOf(",") > -1)
  340.             {
  341.                props = props.split(" ").join("").split(",");
  342.             }
  343.             else
  344.             {
  345.                props = [props];
  346.             }
  347.          }
  348.          _loc4_ = {};
  349.          for(var _loc5_ in props)
  350.          {
  351.             _loc4_[props[_loc5_]] = true;
  352.          }
  353.       }
  354.       _global.$tweenManager.rewTween(this,_loc4_);
  355.    };
  356.    Mp.alphaTo = function(destAlpha, seconds, animType, delay, callback, extra1, extra2)
  357.    {
  358.       this.tween(["_alpha"],[destAlpha],seconds,animType,delay,callback,extra1,extra2);
  359.    };
  360.    Mp.scaleTo = function(destScale, seconds, animType, delay, callback, extra1, extra2)
  361.    {
  362.       this.tween(["_xscale","_yscale"],[destScale,destScale],seconds,animType,delay,callback,extra1,extra2);
  363.    };
  364.    Mp.sizeTo = function(destSize, seconds, animType, delay, callback, extra1, extra2)
  365.    {
  366.       this.tween(["_width","_height"],[destSize,destSize],seconds,animType,delay,callback,extra1,extra2);
  367.    };
  368.    Mp.slideTo = function(destX, destY, seconds, animType, delay, callback, extra1, extra2)
  369.    {
  370.       this.tween(["_x","_y"],[destX,destY],seconds,animType,delay,callback,extra1,extra2);
  371.    };
  372.    Mp.rotateTo = function(destRotation, seconds, animType, delay, callback, extra1, extra2)
  373.    {
  374.       this.tween(["_rotation"],[destRotation],seconds,animType,delay,callback,extra1,extra2);
  375.    };
  376.    _global.getColorTransObj = function(type, amt, rgb)
  377.    {
  378.       switch(type)
  379.       {
  380.          case "brightness":
  381.             var _loc4_ = 100 - Math.abs(amt);
  382.             var _loc6_ = 0;
  383.             if(amt > 0)
  384.             {
  385.                _loc6_ = 256 * (amt / 100);
  386.             }
  387.             return {ra:_loc4_,rb:_loc6_,ga:_loc4_,gb:_loc6_,ba:_loc4_,bb:_loc6_};
  388.          case "brightOffset":
  389.             _loc6_ = 256 * (amt / 100);
  390.             return {ra:100,rb:_loc6_,ga:100,gb:_loc6_,ba:100,bb:_loc6_};
  391.          case "contrast":
  392.             var _loc2_ = {};
  393.             var _loc0_ = null;
  394.             _loc2_.ba = _loc0_ = amt;
  395.             _loc2_.ga = _loc0_;
  396.             _loc2_.ra = _loc0_;
  397.             _loc2_.bb = _loc0_ = 128 - 1.28 * amt;
  398.             _loc2_.gb = _loc0_;
  399.             _loc2_.rb = _loc0_;
  400.             return _loc2_;
  401.          case "invertColor":
  402.             _loc2_ = {};
  403.             _loc2_.ba = _loc0_ = 100 - 2 * amt;
  404.             _loc2_.ga = _loc0_;
  405.             _loc2_.ra = _loc0_;
  406.             _loc2_.bb = _loc0_ = amt * 2.55;
  407.             _loc2_.gb = _loc0_;
  408.             _loc2_.rb = _loc0_;
  409.             return _loc2_;
  410.          case "tint":
  411.             if(rgb == undefined || rgb == null)
  412.             {
  413.                break;
  414.             }
  415.             var _loc8_ = rgb >> 16;
  416.             var _loc9_ = rgb >> 8 & 0xFF;
  417.             var _loc7_ = rgb & 0xFF;
  418.             var _loc5_ = amt / 100;
  419.             _loc2_ = {rb:_loc8_ * _loc5_,gb:_loc9_ * _loc5_,bb:_loc7_ * _loc5_};
  420.             _loc2_.ba = _loc0_ = 100 - amt;
  421.             _loc2_.ga = _loc0_;
  422.             _loc2_.ra = _loc0_;
  423.             return _loc2_;
  424.       }
  425.       return {rb:0,ra:100,gb:0,ga:100,bb:0,ba:100};
  426.    };
  427.    Mp.brightnessTo = function(bright, seconds, animType, delay, callback, extra1, extra2)
  428.    {
  429.       this.tween(["_ct_"],[getColorTransObj("brightness",bright)],seconds,animType,delay,callback,extra1,extra2);
  430.    };
  431.    Mp.brightOffsetTo = function(percent, seconds, animType, delay, callback, extra1, extra2)
  432.    {
  433.       this.tween(["_ct_"],[getColorTransObj("brightOffset",percent)],seconds,animType,delay,callback,extra1,extra2);
  434.    };
  435.    Mp.contrastTo = function(percent, seconds, animType, delay, callback, extra1, extra2)
  436.    {
  437.       this.tween(["_ct_"],[getColorTransObj("contrast",percent)],seconds,animType,delay,callback,extra1,extra2);
  438.    };
  439.    Mp.colorTo = function(rgb, seconds, animType, delay, callback, extra1, extra2)
  440.    {
  441.       this.tween(["_ct_"],[getColorTransObj("tint",100,rgb)],seconds,animType,delay,callback,extra1,extra2);
  442.    };
  443.    Mp.colorTransformTo = function(ra, rb, ga, gb, ba, bb, aa, ab, seconds, animType, delay, callback, extra1, extra2)
  444.    {
  445.       var _loc2_ = {ra:ra,rb:rb,ga:ga,gb:gb,ba:ba,bb:bb,aa:aa,ab:ab};
  446.       this.tween(["_ct_"],[_loc2_],seconds,animType,delay,callback,extra1,extra2);
  447.    };
  448.    Mp.invertColorTo = function(percent, seconds, animType, delay, callback, extra1, extra2)
  449.    {
  450.       this.tween(["_ct_"],[getColorTransObj("invertColor",percent)],seconds,animType,delay,callback,extra1,extra2);
  451.    };
  452.    Mp.tintTo = function(rgb, percent, seconds, animType, delay, callback, extra1, extra2)
  453.    {
  454.       this.tween(["_ct_"],[getColorTransObj("tint",percent,rgb)],seconds,animType,delay,callback,extra1,extra2);
  455.    };
  456.    Mp.getFrame = function()
  457.    {
  458.       return this._currentframe;
  459.    };
  460.    Mp.setFrame = function(fr)
  461.    {
  462.       this.gotoAndStop(Math.round(fr));
  463.    };
  464.    Mp.addProperty("_frame",Mp.getFrame,Mp.setFrame);
  465.    Mp.frameTo = function(endframe, duration, animType, delay, callback, extra1, extra2)
  466.    {
  467.       if(endframe == undefined)
  468.       {
  469.          endframe = this._totalframes;
  470.       }
  471.       this.tween("_frame",endframe,duration,animType,delay,callback,extra1,extra2);
  472.    };
  473.    var TFP = TextField.prototype;
  474.    if(!TFP.origAddListener)
  475.    {
  476.       TFP.origAddListener = TFP.addListener;
  477.       ASSetPropFlags(TFP,"origAddListener",1,0);
  478.       TFP.addListener = function()
  479.       {
  480.          if(!this._listeners)
  481.          {
  482.             AsBroadcaster.initialize(this);
  483.          }
  484.          this.origAddListener.apply(this,arguments);
  485.       };
  486.    }
  487.    var $_$methods = ["tween","stopTween","isTweening","getTweens","lockTween","isTweenLocked","unlockTween","isTweenPaused","pauseTween","unpauseTween","pauseAllTweens","unpauseAllTweens","stopAllTweens","ffTween","rewTween","getFrame","setFrame","_frame","frameTo","alphaTo","brightnessTo","colorTo","colorTransformTo","invertColorTo","tintTo","scaleTo","sizeTo","slideTo","rotateTo","brightOffsetTo","contrastTo"];
  488.    for(var $_$i in $_$methods)
  489.    {
  490.       ASSetPropFlags(Mp,$_$methods[$_$i],1,0);
  491.       if($_$methods[$_$i].toLowerCase().indexOf("frame") == -1)
  492.       {
  493.          TFP[$_$methods[$_$i]] = Mp[$_$methods[$_$i]];
  494.          ASSetPropFlags(TFP,$_$methods[$_$i],1,0);
  495.       }
  496.    }
  497.    delete Mp;
  498.    delete TFP;
  499.    delete $_$methods;
  500.    delete $_$i;
  501.    TextField.prototype.typeWriter = function(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)
  502.    {
  503.       clearInterval(this.tw__interval);
  504.       var originalTxt = arg1;
  505.       this._visible = false;
  506.       if(this.html)
  507.       {
  508.          this.htmlText = arg1;
  509.       }
  510.       else
  511.       {
  512.          this.text = arg1;
  513.       }
  514.       if(arg4 == undefined || null)
  515.       {
  516.          arg4 = "";
  517.       }
  518.       var txt = this.text;
  519.       var txt_length = txt.length;
  520.       this.text = "";
  521.       if(this.autoSize == false || "none")
  522.       {
  523.          var last_visible_word = 0;
  524.          var last_visible_character = 0;
  525.          var txt_array = txt.split(" ");
  526.          var temp_string = "";
  527.          var i = 0;
  528.          while(i < txt_array.length)
  529.          {
  530.             temp_string += txt_array[i] + " ";
  531.             this.text = temp_string;
  532.             if(this.textHeight > this._height)
  533.             {
  534.                last_visible_character = temp_string.length;
  535.                last_visible_word = i - 1;
  536.                break;
  537.             }
  538.             i++;
  539.          }
  540.          if(last_visible_word == 0)
  541.          {
  542.             last_visible_character = txt_length;
  543.          }
  544.       }
  545.       else
  546.       {
  547.          last_visible_character = txt_length;
  548.       }
  549.       this.text = "";
  550.       this._visible = true;
  551.       txt_array = [];
  552.       var w = 0;
  553.       var dw = Math.acos((last_visible_character - 0.2) / last_visible_character);
  554.       var characters_counter = 0;
  555.       var characters = 0;
  556.       var characters_basis = last_visible_character;
  557.       var characters_div = 0;
  558.       if(last_visible_character > arg3)
  559.       {
  560.          var characters = Math.round(last_visible_character * Math.sin(dw));
  561.          while(characters_counter < last_visible_character - arg3)
  562.          {
  563.             txt_array.push(txt.substring(characters_counter,characters_counter + characters));
  564.             characters_counter += characters;
  565.          }
  566.          characters_basis = last_visible_character - characters_counter;
  567.          characters_div = characters_counter;
  568.          dw = Math.acos((characters_basis - 0.2) / characters_basis);
  569.       }
  570.       var w = dw;
  571.       while(w <= 1.5707963267948966)
  572.       {
  573.          characters = Math.round(characters_div + characters_basis * Math.sin(w));
  574.          if(characters <= characters_counter)
  575.          {
  576.             characters = characters_counter + 1;
  577.          }
  578.          if(characters >= last_visible_character)
  579.          {
  580.             characters = last_visible_character;
  581.             txt_array.push(txt.substring(characters_counter,characters));
  582.             break;
  583.          }
  584.          txt_array.push(txt.substring(characters_counter,characters));
  585.          characters_counter = characters;
  586.          w += dw;
  587.       }
  588.       temp_string = "";
  589.       var txtPfad = this;
  590.       var tw__interval = this.tw__interval = setInterval(function()
  591.       {
  592.          if(eval(txtPfad) == undefined)
  593.          {
  594.             clearInterval(tw__interval);
  595.          }
  596.          if(txt_array.length > 0)
  597.          {
  598.             temp_string += txt_array.shift();
  599.             txtPfad.text = temp_string + arg4;
  600.          }
  601.          else
  602.          {
  603.             clearInterval(tw__interval);
  604.             if(txtPfad.html)
  605.             {
  606.                txtPfad.htmlText = originalTxt;
  607.             }
  608.             else
  609.             {
  610.                txtPfad.text = originalTxt;
  611.             }
  612.             if(arg5)
  613.             {
  614.                txtPfad.styleSheet = arg5;
  615.             }
  616.             if(arg6)
  617.             {
  618.                arg6.apply(null,arg7);
  619.             }
  620.          }
  621.       }
  622.       ,arg2);
  623.    };
  624.    ASSetPropFlags(TextField.prototype,"typeWriter",1,0);
  625.    TextField.prototype.stringCutter_advanced = function(arg1, arg2)
  626.    {
  627.       var _loc8_ = this.textHeight;
  628.       if(arg1 == undefined)
  629.       {
  630.          arg1 = " ";
  631.       }
  632.       var _loc4_ = 0;
  633.       this.scroll = 1;
  634.       while(this.maxscroll > 1)
  635.       {
  636.          var _loc2_ = 0;
  637.          while(this.scroll <= 1 && _loc2_ < this.text.length)
  638.          {
  639.             _loc2_ = _loc2_ + 1;
  640.             Selection.setFocus(this);
  641.             this.scroll = 1;
  642.             Selection.setSelection(0,_loc2_);
  643.          }
  644.          var _loc5_ = this.text.lastIndexOf("\r",_loc2_ - _loc4_);
  645.          var _loc6_ = this.text.lastIndexOf(" ",_loc2_ - _loc4_);
  646.          var _loc3_ = Math.max(_loc5_,_loc6_);
  647.          if(_loc3_ == -1)
  648.          {
  649.             _loc3_ = _loc2_ - _loc4_ - arg1.length - 1;
  650.             break;
  651.          }
  652.          Selection.setFocus(this);
  653.          Selection.setSelection(_loc3_,this.length);
  654.          this.replaceSel(arg1);
  655.          this.scroll = 1;
  656.          _loc4_ += 2;
  657.       }
  658.       if(arg2)
  659.       {
  660.          this.styleSheet = arg2;
  661.       }
  662.    };
  663.    ASSetPropFlags(TextField.prototype,"stringCutter_advanced",1,0);
  664.    parseColor = function(_color)
  665.    {
  666.       parsed_color = parseInt("0x" + _color,16);
  667.       return parsed_color;
  668.    };
  669.    drawBox = function(clip, wSize, hSize, color1, color2, alpha1, alpha2, fillType)
  670.    {
  671.       colors = [color1,color2];
  672.       alphas = [alpha1,alpha2];
  673.       ratios = [0,255];
  674.       matrix = {matrixType:"box",x:0,y:0,w:wSize,h:hSize,r:1.5707963267948966};
  675.       clip.lineStyle(0,16777215,0);
  676.       clip.beginGradientFill(fillType,colors,alphas,ratios,matrix);
  677.       clip.lineTo(wSize,0);
  678.       clip.lineTo(wSize,hSize);
  679.       clip.lineTo(0,hSize);
  680.       clip.lineTo(0,0);
  681.       clip.endFill();
  682.    };
  683.    toolTip = function(_text_info, __mc, _align, _offset_x, _offset_y)
  684.    {
  685.       clearInterval(tooltip_delay);
  686.       tooltip_delay = setTimeout(attachToolTip,250,_text_info,__mc,_align,_offset_x,_offset_y);
  687.    };
  688.    attachToolTip = function(_text_info, __mc, _align, _offset_x, _offset_y)
  689.    {
  690.       offset_x = 0;
  691.       offset_y = 0;
  692.       if(_offset_x)
  693.       {
  694.          offset_x = _offset_x;
  695.       }
  696.       if(_offset_y)
  697.       {
  698.          offset_y = _offset_y;
  699.       }
  700.       __mc.attachMovie("tool_tip_mc","tool_tip_mc",__mc.getNextHighestDepth());
  701.       current_tool_tip = __mc.tool_tip_mc;
  702.       current_tool_tip.text_info = _text_info;
  703.       current_tool_tip.t_align = _align;
  704.       current_tool_tip._x = -12 - offset_x;
  705.       current_tool_tip._y = -30 - offset_y;
  706.       clearInterval(tooltip_delay);
  707.       tooltip_delay = setTimeout(killToolTip,tooltip_delay_time);
  708.    };
  709.    killToolTip = function()
  710.    {
  711.       clearInterval(tooltip_delay);
  712.       current_tool_tip.removeMovieClip();
  713.    };
  714. }
  715. var cd_content;
  716. var contPath = "config/content.xml";
  717.